/**   
* @Title: UserController.java
* @Package me.cloud
* @Description: TODO
* @author xaoyaoyao
* @date 2018年12月5日 上午9:28:24
* @version V1.0   
*/
package me.cloud;

import java.util.Arrays;
import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UserController
 * @Description: TODO
 * @author xaoyaoyao
 * @date 2018年12月5日 上午9:28:24
 * 
 */
@RestController
@RequestMapping("/v1/user")
public class UserController {

	@GetMapping("/list")
	public List<String> getList() {
		return Arrays.asList("xaoyaoyao", "weiwei", "aliluya");
	}

	@PostMapping("/addUser")
	@ResponseBody
	public User addUser(@RequestBody User user) {
		return user;
	}

}
